K-Map

Karnaugh Map

K-map: Visual diagram that simplifies boolean algebra expressions.

Rules:

Examples: 2-input

AND:

a’a
b’00
b01

OR:

a’a
b’01
b11

XOR:

a’a
b’01
b10

Examples: 3-input

c’:

a’b’a’babab’
c’1111
c0000

a’:

a’b’a’babab’
c’1100
c1100

b:

a’b’a’babab’
c’0110
c0110

bc’

a’b’a’babab’
c’0110
c0000

a’b

a’b’a’babab’
c’0100
c0100

a’b + bc’:

a’b’a’babab’
c’0110
c0100

3NOR: a’b’c’

a’b’a’babab’
c’1000
c0000

3XNOR:

a’b’a’babab’
c’1010
c0101

Majority:

a’b’a’babab’
c’0010
c0111

Maj(a’,b,c’):

a’b’a’babab’
c’1110
c0100

Maj(a’,b’,c’):

a’b’a’babab’
c’1101
c1000

Examples: Four-inputs

b:

a’b’a’babab’
c’d’0110
c’d0110
cd0110
cd’0110

d:

a’b’a’babab’
c’d’0000
c’d1111
cd1111
cd’0000

bd:

a’b’a’babab’
c’d’0000
c’d0110
cd0110
cd’0000

(a+b+c+d)’:

a’b’a’babab’
c’d’1000
c’d0000
cd0000
cd’0000

4XNOR:

a’b’a’babab’
c’d’1010
c’d0101
cd1010
cd’0101

???:

a’b’a’babab’
c’d’0010
c’d0101
cd1010
cd’0101

ab+xnor(a,b,cd):

a’b’a’babab’
c’d’1010
c’d0111
cd1110
cd’0101

???:

a’b’a’babab’
c’d’1001
c’d0000
cd0000
cd’1001

Q: What is this? A: b’d’

Don’t Care (x)

“Don’t care”: An unknown value in a multi-valued logic system.

Examples:

Q: What should we set X to?

a’a
b’11
b1X

A: 1

Q: What should we set X to?

a’b’a’babab’
c’1X10
c0101

A: 0

Example: SR-Flip-Flop

This is the truth table of a SR-Flip-Flop

SRQ^+
00Q
010
101

Now let’s construct a truth table for going from one value to another

Q \to Q^+SR
0 \to 000
01
0X
0 \to 110
10
10
1 \to 001
01
01
1 \to 100
10
X0

Example: D-Flip Flop

This is the truth table of a D-Flip-Flop

DQ^+
00
11

Now let’s construct a truth table for going from one value to another

Q \to Q^+D
0 \to 00
0 \to 11
1 \to 00
1 \to 11

Example: T-Flip Flop

This is the truth table of a T-Flip-Flop

TQ^+
0Q
1Q’

Now let’s construct a truth table for going from one value to another

Q \to Q^+T
0 \to 00
0 \to 11
1 \to 01
1 \to 10

Example: JK-Flip-Flop

This is the truth table of a JK-Flip-Flop

JKQ^+
00Q
010
101
11Q’

Now let’s construct a truth table for going from one value to another

Q \to Q^+JK
0 \to 000
01
0X
0 \to 110
11
1X
1 \to 001
11
X1
1 \to 100
10
X0

As we can see, JK-flip-flop has a lot of don’t cares, which means there’s lot of choices to make in design.